Total Complexity | 2 |
Total Lines | 70 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import { Entity, Column } from 'typeorm'; |
||
3 | |||
4 | @Entity() |
||
5 | export class School extends AbstractSchool { |
||
6 | @Column({ type: 'text', nullable: true }) |
||
7 | private observation: string; |
||
8 | |||
9 | constructor( |
||
10 | reference: string, |
||
11 | name: string, |
||
12 | address: string, |
||
13 | zipCode: string, |
||
14 | city: string, |
||
15 | status: Status, |
||
16 | type: Type, |
||
17 | email?: string, |
||
18 | phoneNumber?: string, |
||
19 | numberOfStudents?: number, |
||
20 | numberOfClasses?: number, |
||
21 | observation?: string |
||
22 | ) { |
||
23 | super( |
||
24 | reference, |
||
25 | name, |
||
26 | address, |
||
27 | zipCode, |
||
28 | city, |
||
29 | status, |
||
30 | type, |
||
31 | phoneNumber, |
||
32 | email, |
||
33 | numberOfStudents, |
||
34 | numberOfClasses |
||
35 | ); |
||
36 | |||
37 | this.observation = observation; |
||
38 | } |
||
39 | |||
40 | public getObservation(): string { |
||
41 | return this.observation; |
||
42 | } |
||
43 | |||
44 | public update( |
||
45 | reference: string, |
||
46 | name: string, |
||
47 | address: string, |
||
48 | zipCode: string, |
||
49 | city: string, |
||
50 | status: Status, |
||
51 | type: Type, |
||
52 | email?: string, |
||
53 | phoneNumber?: string, |
||
54 | numberOfStudents?: number, |
||
55 | numberOfClasses?: number, |
||
56 | observation?: string |
||
57 | ): void { |
||
58 | this.baseUpdate( |
||
59 | reference, |
||
60 | name, |
||
61 | address, |
||
62 | zipCode, |
||
63 | city, |
||
64 | status, |
||
65 | type, |
||
66 | email, |
||
67 | phoneNumber, |
||
68 | numberOfStudents, |
||
69 | numberOfClasses |
||
70 | ); |
||
71 | |||
72 | this.observation = observation; |
||
73 | } |
||
75 |